<?php


namespace app\middleware;

use app\service\Token;

class ApiCheckAuth
{
    /**
     * 接口访问权限验证
     * @param $request
     * @param \Closure $next
     * @return mixed
     * @throws \app\service\exception\ApiException
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\DbException
     * @throws \think\db\exception\ModelNotFoundException
     */
    public function handle($request, \Closure $next)
    {
        Token::checkMemberToken();
        return $next($request);
    }
}